﻿import request from '/@/utils/request';
enum Api {
  AddRoaddisinfo = '/api/roaddisinfo/add',
  DeleteRoaddisinfo = '/api/roaddisinfo/delete',
  UpdateRoaddisinfo = '/api/roaddisinfo/update',
  PageRoaddisinfo = '/api/roaddisinfo/page',
  DetailRoaddisinfo = '/api/roaddisinfo/detail',
  uploadFilesPoject = `/api/sysFile/uploadFilesPojectdis`,

}

// 增加病害信息
export const addRoaddisinfo = (params?: any) =>
	request({
		url: Api.AddRoaddisinfo,
		method: 'post',
		data: params,
	});

// 删除病害信息
export const deleteRoaddisinfo = (params?: any) => 
	request({
			url: Api.DeleteRoaddisinfo,
			method: 'post',
			data: params,
		});

// 编辑病害信息
export const updateRoaddisinfo = (params?: any) => 
	request({
			url: Api.UpdateRoaddisinfo,
			method: 'post',
			data: params,
		});

// 分页查询病害信息
export const pageRoaddisinfo = (params?: any) => 
	request({
			url: Api.PageRoaddisinfo,
			method: 'post',
			data: params,
		});

// 详情病害信息
export const detailRoaddisinfo = (id: any) => 
	request({
			url: Api.DetailRoaddisinfo,
			method: 'get',
			data: { id },
		});

export const uploadFilesPoject = (params?: any) => {
	return request({
		url: Api.uploadFilesPoject,
		method: 'post',
		data: params,
		headers: {
			'Content-Type': 'multipart/form-data',
		},
	});
};
